<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <com>
                <li>体育</li>
                <!-- 具名插槽 -->
                <template v-slot:header>这是网站的头部</template>
                <template v-slot:content>这是网站的内容</template>
                <template v-slot:footer>这是网站的底部</template>
            </com>
        </div>
        <template id="com">
            <div>
                <div>
                    <slot name="header"></slot>
                </div>
                <div>
                    <slot name="content"></slot>
                </div>
                <div>
                    <slot name="footer"></slot>
                </div>
                <ul>
                    <slot></slot>
                    <li>新闻</li>
                    <li>娱乐</li>
                    <li>财经</li>
                </ul>
            </div>
        </template>
        <script src="../vue.js"></script>
        <script>
            let com = {
                template: '#com',
            };
            new Vue({
                el: '#app',
                components: {
                    com,
                },
            });
        </script>
    </body>
</html>
